<div class="query-wrapper">
  <div class="form-inline" #myQuery="ngForm" ngForm>
    <div class="form-group">
      <label>数据类型：</label>
      <select class="form-control" style="border-radius: 4px;" [(ngModel)]="_params.datatype" name="datatype">
        <option *ngFor="let select of selects" [value]="select.value">
            {{select.name}}
        </option>
      </select>
    </div>
    <app-time-type [begindate]="begindate" [enddate]="enddate" (emitDate)="getDate($event)" [hasEnd]="true"></app-time-type>
    <div class="form-group">
      <button class="btn btn-primary btn-sm"  (click)="condition()"><i class="fa fa-search" aria-hidden="true"></i>&nbsp;&nbsp;查询</button>
    </div>
  </div>
</div>
<div class="container">
  <div class="row">
    <div class="col-sm-1"></div>
    <div class="col-sm-10">
      <echarts-ng2 #echarts [theme]="'macarons'"></echarts-ng2>
    </div>
    <div class="col-sm-1"></div>
  </div>
</div>
<div class="container table-striped-wrapper">
  <div class="row table-title">
    <div class="col-sm-1"></div>
    <div class="col-sm-3">
      用户：{{deviceInfo.name}}
    </div>
    <div class="col-sm-2">
      类型：
    </div>
    <div class="col-sm-3">

    </div>
    <div class="col-sm-2">
        <button class="btn btn-primary btn-sm"><i class="fa fa-external-link" aria-hidden="true"></i>&nbsp;&nbsp;导出Excel</button>
    </div>
  </div>
  <div class="row">
    <div class="col-sm-1"></div>
    <div class="col-sm-10">
      <table class="table table-striped">
        <thead>
          <tr>
            <th *ngFor="let th of ths">{{th}}</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let tr of trs">
            <td>{{tr.name}}</td>
            <td>{{tr.date}}</td>
            <td>{{tr.energy}}</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>